{extend name="layout" /}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-10">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>{$meta_title}</h5>
                    <div class="ibox-tools">
                        <a class="collapse-link">
                            <i class="fa fa-chevron-up"></i>
                        </a>
                    </div>
                </div>
                <div class="ibox-content">
                    <form class="form-horizontal m-t" name="post-form" id="commentForm" method="post" action="">
                    	<input type="hidden" name="id" value="{$info.id}">
                    	<div class="form-group">
                            <label class="col-sm-3 control-label">分类ID：</label>
                            <div class="col-sm-8">
                                <select name="cat_id" class="form-control" required="" aria-required="true">
                                	{volist name="cate" id="vo"}
                                	<option value="{$key}">{$vo}</option>
                                	{/volist}
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">文章标题：</label>
                            <div class="col-sm-8">
                                <input  name="title" minlength="1" maxlength="50" type="text" class="form-control" required="" aria-required="true" value="{$info.title}">
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 文章标题不能为空</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">作者：</label>
                            <div class="col-sm-8">
                                <input  name="author" type="text" value="{$info.author}" class="form-control" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">摘要：</label>
                            <div class="col-sm-8">
                                <textarea name="description" class="form-control" value="{$info.description}" ></textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">封面图：</label>
                            <div class="col-sm-8 js-upload-image">
	                             <ul class="uploader-list" id="file_list_thumb">
	                              	{notempty name="$info['thumb']"}
						            <div class="file-item thumbnail">
						                <a class="img-link" >
						                    <img src="{$info['thumb']|get_thumb}" width="100">
						                </a>
						                <i class="fa fa-times-circle remove-picture"></i>
						            </div>
						            {/notempty}
	                             </ul>
	                             <div class="clearfix"></div>
	                             <input type="hidden" name="thumb" data-multiple="false" data-size="2*1024" data-ext="jpeg,png,jpg,gif" id="thumb" value="{$info.thumb|default=0}">
	                             <div id="picker_thumb">
	                              图片上传
	                             </div>
	                         </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">附件：</label>
                            <div class="col-sm-8 js-upload-files">
						        <ul class="list-group uploader-list" id="file_list_files">
						           	{notempty name="files"}   
							           	{volist name="files" id="v"} 
							           	<li class="list-group-item file-item"><i class="icon-remove-sign remove-file" data-id=""></i>{$v['name']}</li>
							           	{/volist}
                          			{/notempty}   
						        </ul>
						        <input type="hidden" name="files" data-multiple="true" data-size="{$config['upload_file_size']|default=0}" data-ext="{$config['upload_file_ext']|default=''}" id="files" value="">
						        <div id="picker_files">
						        	上传附件
						        </div>
						    </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">发布时间：</label>
                            <div class="col-sm-8">
                            	<input type="text" readonly name="publish_time" value="{$info.publish_time}" class="form-control" id="laydate" >
                                
                                <span class="help-block m-b-none"><i class="fa fa-info-circle"></i>默认为上传时间</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">关键字：</label>
                            <div class="col-sm-8">
                                <input  name="keywords" type="text" value="{$info.keywords}" class="form-control" >
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label">内容：</label>
                            <div class="col-sm-8">
                                <textarea class="span12 ckeditor" id="content" name="content" style="height:368px;" title="">{$info.content}</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                    		<label class="col-sm-3 control-label">状态：</label>
                    		<div class="col-sm-8">
                    			<div class="radio i-checks">
                                    <label><input type="radio" value="1" checked name="status"> <i></i> 显示</label>
                                    <label><input type="radio" value="0" name="status"> <i></i> 隐藏</label>
                                </div>
                            </div>
                    	</div>
                        <div class="form-group">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button class="btn btn-primary btn-post" target-form="post-form" type="submit">提交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}

{block name="script"}
<script type="text/javascript">
	var ue = UE.getEditor('content');
</script>
{/block}

